package cn.gong.jizhang.manager;

import java.util.ArrayList;

import cn.gong.jizhang.service.BackstageTask;

public class TaskManager {
	private ArrayList<BackstageTask> allTask;

	private static TaskManager instance = new TaskManager();

	private TaskManager() {
		allTask = new ArrayList<BackstageTask>();
	}

	public static TaskManager getInstance() {
		return instance;
	}

	public void addTask(BackstageTask ts) {
		allTask.add(ts);
	}

	public void removeTask(BackstageTask ts) {
		allTask.remove(ts);
	}

	public ArrayList<BackstageTask> getTaskArray() {
		return allTask;
	}

	public int getSize() {
		return allTask.size();
	}

	public BackstageTask getTask(int index) {
		return allTask.get(index);
	}
}
